x86/S3: Clarify and improve the behaviour of do_suspend_lowlevel()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 13 Dec 2019 17:36:09 +0000 (17:36 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 18 Dec 2019 11:42:54 +0000 (11:42 +0000)
commit62874a4df3b9653e862fe36ad2779b60234ea7b9
tree5289a565e4a947b915db5d2a26f22eaf30d95bd1
parent704fa1532801bc02c4500462f0b913b3c137db4d
x86/S3: Clarify and improve the behaviour of do_suspend_lowlevel()

do_suspend_lowlevel() behaves as a function call, even when the trampoline
jumps back into the middle of it.  Discuss this property, while renaming the
far-too-generic __ret_point to s3_resume.

Optimise the calling logic for acpi_enter_sleep_state().  $3 doesn't require a
64bit write, and the function isn't variadic so doesn't need to specify zero
FPU registers in use.

In the case of an acpi_enter_sleep_state() error, we didn't actually lose
state so don't need to restore it.  Jump straight to the end.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/acpi/wakeup_prot.S
xen/arch/x86/boot/wakeup.S